
<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

//不需要登陆
Route::post('login/dologin', 'Login\LoginController@dologin');

Route::post('getadminaccount', 'Common\CommonController@getadminaccount');


//需登录
Route::group([
    'prefix' => '',
    'middleware' => ['adminislogin','sitesigncheck']
], function ($router) {


    Route::post('login/dologinout', 'Login\LoginController@dologinout');
    Route::post('login/changepassword', 'Login\LoginController@changepassword');


    Route::group([
        'prefix' => 'company'
    ], function ($router) {
        Route::post('dopost', 'Manger\CompanyController@dopost');
        Route::post('getlist', 'Manger\CompanyController@getlist');
        Route::post('changestatus', 'Manger\CompanyController@changestatus');
    });


    Route::group([
        'prefix' => 'adminuser'
    ], function ($router) {
        Route::post('getlist', 'Manger\AdminController@getlist');
    });

    Route::group([
        'prefix' => 'common'
    ], function ($router) {
        Route::post('getmenulist', 'Common\CommonController@getmenulist');
        Route::post('getcpdlist', 'Common\CommonController@getcpdlist');
        Route::post('getcpduserlist', 'Common\CommonController@getcpduserlist');
        Route::post('getcustomlist', 'Common\CommonController@getcustomlist');
        Route::post('getsteelattrlist', 'Common\CommonController@getsteelattrlist');
        Route::post('getarchivespec', 'Common\CommonController@getarchivespec');
        Route::post('getmangerlist', 'Common\CommonController@getmangerlist');
        // Route::post('syncdinginfo', 'Common\DingdingController@syncdinginfo');

    });



    Route::group([
        'prefix' => 'manger'
    ], function ($router) {
        Route::post('dopostadd', 'Manger\MangerController@dopostadd');
        Route::post('dopostedit', 'Manger\MangerController@dopostedit');
        Route::post('getlist', 'Manger\MangerController@getlist');
        Route::post('changestatus', 'Manger\MangerController@changestatus');
        Route::post('resetpassword', 'Manger\MangerController@resetpassword');
        Route::post('getruleinfo', 'Manger\MangerController@getruleinfo');
        Route::post('dopostrule', 'Manger\MangerController@dopostrule');
    });

    Route::group([
        'prefix' => 'datashow'
    ], function ($router) {
        Route::post('purchaseshowdata', 'Datashow\DatashowController@purchaseshowdata');
        Route::post('saleshowdata', 'Datashow\DatashowController@saleshowdata');
        //呆滞存货分析
        Route::post('sluggishinventoryanalysis', 'Datashow\DatashowController@sluggishinventoryanalysis');
        //库存周转率分析
        Route::post('inventoryturnoveranalysis', 'Datashow\DatashowController@inventoryturnoveranalysis');
        //库龄分析
        Route::post('inventoryageanalysis', 'Datashow\DatashowController@inventoryageanalysis');
        //销售毛利分析
        Route::post('salegrossprofitanalysis', 'Datashow\DatashowController@salegrossprofitanalysis');

    });

    Route::group([
        'prefix' => 'reportforms',
    ], function ($router) {
        Route::post('getlistqoq', 'Datashow\ReportFormsController@getlistqoq');
        Route::post('getlistchain', 'Datashow\ReportFormsController@getlistchain');
        Route::post('getPriceTrend', 'Datashow\ReportFormsController@getPriceTrend');
        Route::post('getPurchaseOverview', 'Datashow\ReportFormsController@getPurchaseOverview');
        Route::post('getSaleOverview', 'Datashow\ReportFormsController@getSaleOverview');
//        Route::post('getprice', 'Datashow\PriceFormsController@getprice');
    });

});
